<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>5.1 CSS3动画中的@keyframes关键帧讲解</title>
    <style>
        .rect{
            width: 100px;
            height: 100px;
            background-color: red;
            position: fixed;
            animation: mymove 3s infinite;/*执行两秒反复执行*/
        }
        @keyframes mymove {
            0%{ top:0;left: 20%; background-color: red}
            25%{ top:0;left: 80%;background-color: blue}
            50%{ top:80%;left: 80%;background-color: green}
            75%{top:80%;left: 20%;background-color: black}
            100%{ top:0;left: 20%;background-color: red}
        }
    </style>
</head>
<body>
    <div class="rect">
    </div>
</body>
</html>